home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 028.dms / 028.adf / Features_of_the_Shell / Scripts < prev    next >
Text File  |  1992-02-26  |  2KB  |  34 lines

  1.                                 Scripts
  2.  
  3. A script file is a text file that is created by any text editor, for example
  4. Ed.  It does not, however, contain words, but CLI commands in a list, one
  5. per line.  Script files can be executed, line by line, with the command
  6. Execute.  The scripts are read by AmigaDOS then the commands are executed
  7. in order, one by one.  Script files can save you a lot of time by doing
  8. repetitive tasks.  For example, if you regularly copied a dozen files from
  9. one disk to another you could write a script then execute it every time you
  10. needed the task doing.  this means you type out the instructions once only,
  11. instead of every time.  The semicolon (;) is used by scripts to add 
  12. comments.  Anything to the right of a semicolon is ignored.  You can only 
  13. put one command per line.  
  14.  
  15. An example script
  16.  
  17. ; Any comment can be put to the right of a semicolon, even a CLI command
  18. ; This script prints a line into the current CLI window then closes it.
  19. Echo "Hello, I am going to close your CLI window"
  20. Endcli
  21. THIS LINE IS NEVER EXECUTED
  22.  
  23. Scripts are stored in the S: directory of your Workbench disk.  Try loading
  24. some into Ed.  The most common script is the file Startup-Sequence, which
  25. you will find in the S: directory of all bootable disks (except game disks).
  26. It usually loads the workbench then closes the CLI window.
  27.  
  28. You can stop a script file by holding down Ctrl and the D key at the same 
  29. time.  The words * Shell... Break appear in the CLI window.  Try doing this
  30. on your Workbench disk as it loads.
  31.  
  32. There are many commands you can use in scripts.  These can be found in the
  33. main part of this disk - the C.L.Index.
  34.